<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数的预声明</title>
</head>
<body>
            <script>
                foo();
                function foo() {
                    alert('嘻嘻')
                }
            </script>
</body>
</html>